package cn.wolfcode.crm.web.controller;

import cn.wolfcode.crm.domain.Checklist;
import cn.wolfcode.crm.query.QueryObject;
import cn.wolfcode.crm.service.IChecklistService;
import cn.wolfcode.crm.service.IClientbillService;
import cn.wolfcode.crm.util.JsonResult;
import cn.wolfcode.crm.util.PageResult;
import cn.wolfcode.crm.util.PermissionName;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @program: crm
 * @description:
 * @author: Mr.chen
 * @create: 2018-07-07 22:06
 **/
@Controller
@RequestMapping("clientbill")
public class ClientbillController {
    @Autowired
    private IClientbillService service;

    @RequestMapping("")
    @PermissionName("客户明细主页")
    @RequiresPermissions("clientbill:index")
    public String index() {
        return "clientbill/list";
    }

    @RequestMapping("list")
    @ResponseBody
    @RequiresPermissions("clientbill:list")
    @PermissionName("客户明细数据")
    public PageResult list(QueryObject qo) {
        PageResult result = service.query(qo);
        return result;
    }





}
